home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1995 November
/
EnigmA AMIGA RUN 02 (1995)(G.R. Edizioni)(IT)[!][issue 1995-11][Skylink CD].iso
/
earcd
/
comm
/
ddbbs113.lha
/
Developer
/
DreamNew.S
< prev
next >
Wrap
Text File
|
1995-06-28
|
18KB
|
995 lines
;DreamNew - Example how to code doors for DayDream BBS in assembler.
;Source is old and lame, but it works.
incdir "dh1:code/include/"
include "lvo3.0/dos_lib.i"
include "lvo3.0/exec_lib.i"
include "dos/dos.i"
include "dos/dostags.i"
include "exec/ports.i"
include "dos/datetime.i"
STRUCTURE Globals,0
ULONG cmdlin
ULONG Buffer
ULONG DoorPort
ULONG ReplyPort
ULONG Message
ULONG DosBase
ULONG UserInfo
ULONG ConfDat
ULONG DayDreamDat
ULONG CConfDat
ULONG ConfAddr
ULONG Userlength
ULONG Messagelength
ULONG Baselength
ULONG Conflength
ULONG DObject
ULONG DLock
ULONG ConfigSize
ULONG ConfigMem
ULONG Dirmem
ULONG Dirsize
ULONG Pospointer1
ULONG Pospointer2
ULONG Screenlength
ULONG FFilesize
ULONG Date
ULONG Ds1
ULONG Ds2
ULONG Ds3
UBYTE DSFormat
UBYTE DSFlags
ULONG DayPtr
ULONG DatePtr
ULONG TimePtr
UWORD Lbfmode
UWORD Exitmode
STRUCT CfgPath,80
STRUCT DirName,60
STRUCT DoorPortName,20
STRUCT Namea,16
STRUCT Flagsa,16
STRUCT Sizea,16
STRUCT Datea,16
STRUCT Desca,16
STRUCT Lbf,120
STRUCT Doorcommand,80
STRUCT FFilename,20
STRUCT FFilepath,80
STRUCT DateStr,40
STRUCT Flagstring,80
LABEL Memsize
Move.L A0,A4 ;Take commandline parameters
Move.L D0,D4
Move.L $4.W,A6
Move.L #Memsize+4096,D0
Move.L #$10001,D1
Jsr _LVOAllocMem(A6) ;Allocate memory for variables
Move.L D0,A5 ;and buffer
Tst.L D0
Beq CleanUp
Add.L #Memsize,D0
Move.L D0,Buffer(A5)
Add.L #4096,D0
Clr.B -1(A4,D4.L)
Move.L A4,cmdlin(A5)
Lea Portname(PC),A0
Lea DoorPortName(A5),A1
CopyPort1 Move.B (A0)+,(A1)+
Tst.B (A0)
Bne CopyPort1
CopyPort2 Move.B (A4)+,(A1)+
Bne CopyPort2
Lea DosName(PC),A1
Moveq #0,D0
Jsr _LVOOpenLibrary(A6)
Move.L D0,DosBase(A5)
Beq CleanUp
Move.L DosBase(A5),A6
Lea VerName(PC),A0 ;Load structuresizes from
Move.L A0,D1 ;Version.DAT
Move.L #MODE_OLDFILE,D2
Jsr _LVOOpen(A6)
Move.L D0,D4
Beq Exit
Move.L D0,D1
Move.L Buffer(A5),D2
Moveq #100,D3
Jsr _LVORead(A6)
Move.L D4,D1
Jsr _LVOClose(A6)
Move.L Buffer(A5),A0
Moveq #0,D0
Move.W 40(A0),D0
Move.L D0,Userlength(A5)
Move.W 52(A0),D0
Move.L D0,Messagelength(A5)
Move.W 38(A0),D0
Move.L D0,Baselength(A5)
Move.W 36(A0),D0
Move.L D0,Conflength(A5)
Move.L #DOS_FIB,D1
Moveq #0,D2
Jsr _LVOAllocDosObject(A6)
Move.L D0,DObject(A5)
Move.L $4.W,A6
Lea DoorPortName(A5),A1 ;Check if doorport exists
Jsr _LVOFindPort(A6)
Move.L D0,DoorPort(A5)
Bne Portfound
Lea Noporttxt(PC),A0 ;No, runned from cli -> exit
Move.L A5,D0
Add.L #DoorPortName,D0
Bsr DpyMsg
Bra CleanUp
Portfound Move.L #MN_SIZE+100,D0
Move.L #$10001,D1
Jsr _LVOAllocMem(A6)
Move.L D0,Message(A5)
Beq CleanUp
Jsr _LVOCreateMsgPort(A6) ;Create port for replies
Move.L D0,ReplyPort(A5)
Beq CleanUp
Move.L Message(A5),A0 ;Initialize doormsg
Move.L D0,MN_REPLYPORT(A0)
Move.W #MN_SIZE+100,MN_LENGTH(A0)
Move.B #NT_MESSAGE,LN_TYPE(A0)
Add.L #MN_SIZE,A0
Move.W #1,(A0)
Lea Banner(PC),A1 ;Tell user that he's using
Move.L A1,2(A0) ;DreamNew!
Bsr SendMsg
Lea EnvName(PC),A0 ;Get path for configfile
Move.L A0,D1
Move.L #MODE_OLDFILE,D2
Move.L DosBase(A5),A6
Jsr _LVOOpen(A6)
Move.L D0,D4
Beq Exit
Move.L D0,D1
Move.L Buffer(A5),D2
Move.L #80,D3
Jsr _LVORead(A6)
Move.L D0,D3
Move.L D4,D1
Jsr _LVOClose(A6)
Move.L Buffer(A5),A0
Add.L D3,A0
Move.B #0,(A0)
Move.L Buffer(A5),A0
Move.L A5,A1
Add.L #CfgPath,A1
CFGPathcopy2 Move.B (A0)+,(A1)+
Bne CFGPathcopy2
Sub.L #1,A1
Lea ConfigName(PC),A0
CFGPathcopy1 Move.B (A0)+,(A1)+
Bne CFGPathcopy1
Conffig Move.L DosBase(A5),A6
Move.L A5,D1
Add.L #CfgPath,D1
Move.L #ACCESS_READ,D2
Jsr _LVOLock(A6)
Move.L D0,DLock(A5)
Beq Exit
ConfigFound Move.L D0,D1
Move.L DObject(A5),D2
Jsr _LVOExamine(A6)
Move.L DObject(A5),A2
Move.L fib_Size(A2),ConfigSize(A5)
Move.L DLock(A5),D1
Jsr _LVOUnLock(A6)
Move.L ConfigSize(A5),D0
Addq.L #2,D0
Move.L #$10001,D1
Move.L $4.W,A6
Jsr _LVOAllocMem(A6)
Move.L D0,ConfigMem(A5)
Beq Exit
Move.L A5,D1
Add.L #CfgPath,D1
Move.L #MODE_OLDFILE,D2 ;Read configfile
Move.L DosBase(A5),A6
Jsr _LVOOpen(A6)
Move.L D0,D4
Beq Exit
Move.L D0,D1
Move.L ConfigMem(A5),D2
Move.L ConfigSize(A5),D3
Jsr _LVORead(A6)
Move.L D4,D1
Jsr _LVOClose(A6)
Lea Nameind(PC),A1
Bsr ExamineCfg
Tst.L D0
Beq Exit
Move.L D0,A0
Lea Namea(A5),A1
CPYNamea Cmp.B #'"',(A0)
Beq NomCPYNamea
Move.B (A0)+,(A1)+
Bne CPYNamea
NomCPYNamea Lea Flagsind(PC),A1
Bsr ExamineCfg
Tst.L D0
Beq Exit
Move.L D0,A0
Lea Flagsa(A5),A1
CPYFlagsa Cmp.B #'"',(A0)
Beq NomCPYFlagsa
Move.B (A0)+,(A1)+
Bne CPYFlagsa
NomCPYFlagsa Lea Sizeind(PC),A1
Bsr ExamineCfg
Tst.L D0
Beq Exit
Move.L D0,A0
Lea Sizea(A5),A1
CPYSizea Cmp.B #'"',(A0)
Beq NomCPYSizea
Move.B (A0)+,(A1)+
Bne CPYSizea
NomCPYSizea Lea Dateind(PC),A1
Bsr ExamineCfg
Tst.L D0
Beq Exit
Move.L D0,A0
Lea Datea(A5),A1
CPYDatea Cmp.B #'"',(A0)
Beq NomCPYDatea
Move.B (A0)+,(A1)+
Bne CPYDatea
NomCPYDatea Lea Descind(PC),A1
Bsr ExamineCfg
Tst.L D0
Beq Exit
Move.L D0,A0
Lea Desca(A5),A1
CPYDesca Cmp.B #'"',(A0)
Beq NomCPYDesca
Move.B (A0)+,(A1)+
Bne CPYDesca
NomCPYDesca Lea Lbfind(PC),A1
Bsr ExamineCfg
Tst.L D0
Beq Nomlbf2
Move.L D0,A0
Lea Lbf(A5),A1
CPYlbf Cmp.B #'"',(A0)
Beq Nomlbf
Move.B (A0)+,(A1)+
Bne CPYlbf
Nomlbf Move.B #10,(A1)
Nomlbf2
Move.L Message(A5),A0 ;Get information from
Move.B #NT_MESSAGE,LN_TYPE(A0) ;DayDream
Add.L #MN_SIZE,A0
Move.W #3,(A0)
Bsr SendMsg
Move.L Message(A5),A0
Add.L #MN_SIZE,A0
Move.L 6(A0),Date(A5)
Move.L 82(A0),UserInfo(A5)
Move.L 46(A0),DayDreamDat(A5)
Move.L 58(A0),ConfDat(A5)
Move.L 62(A0),CConfDat(A5)
Move.L 94(A0),A4
Move.L Date(A5),D0
Lsr.L #7,D0
Divu #675,D0
And.L #$0000FFFF,D0
Move.L D0,Date(A5)
Cmp.l #0,A4
Beq NoParams
Tst.B (A4)
Beq NoParams
Move.L A4,A0
Bsr Convnumb
Move.L D0,D1
Bra GoTro
NoParams Moveq #0,D1
Move.L CConfDat(A5),A0
Move.B 82(A0),D1
GoTro Move.L CConfDat(A5),D0
Add.L #41,D0
Lea DirectoryName(PC),A0
Bsr FmtStr
Move.L Buffer(A5),A0
Lea DirName(A5),A1
CPDNM Move.B (A0)+,(A1)+
Bne CPDNM
Move.L Buffer(A5),D1
Moveq #ACCESS_READ,D2
Move.L DosBase(A5),A6
Jsr _LVOLock(A6)
Move.L D0,D5
Beq Exit
Move.L D0,D1
Move.L DObject(A5),D2
Jsr _LVOExamine(A6)
Move.L DObject(A5),A2
Move.L fib_Size(A2),Dirsize(A5)
Move.L D5,D1
Jsr _LVOUnLock(A6)
Move.L $4.W,A6 ;Allocate memory for catalog
Move.L Dirsize(A5),D0
Add.L #4,D0
Move.L #$10001,D1
Jsr _LVOAllocMem(A6)
Move.L D0,Dirmem(A5)
Beq Exit
Move.L A5,D1 ;Read it
Add.L #DirName,D1
Move.L #MODE_OLDFILE,D2
Move.L DosBase(A5),A6
Jsr _LVOOpen(A6)
Move.L D0,D4
Beq Exit
Move.L D0,D1
Move.L Dirmem(A5),D2
Add.L #2,D2
Move.L Dirsize(A5),D3
Jsr _LVORead(A6)
Move.L D4,D1
Jsr _LVOClose(A6)
Move.L UserInfo(A5),A0 ;Get user's screenlength
Moveq #0,D0
Move.B 136(A0),D0
Move.L D0,Screenlength(A5)
Move.L Dirmem(A5),A1
Add.L Dirsize(A5),A1
Move.B #0,1(A1)
Move.L A1,Pospointer2(A5)
Move.L Screenlength(A5),D4
Subq.L #1,D4
Skuismee Moveq #0,D5
GetPrevfile1 Tst.B -(A1)
Beq ExitOn
Cmp.B #10,(A1)
Bne GetPrevfile1
Slekepoo Add.L #1,D5
Move.B #0,(A1)
Cmp.B #' ',1(A1)
Beq GetPrevfile1
Move.L A1,Pospointer2(A5)
Add.L #1,A1
Skuismee2 Tst.L D5
Beq Skuismeeend
Bsr Showline
Nextlineof Tst.B (A1)+
Bne Nextlineof
Sub.L #1,D4
Tst.L D4
Beq Prompt
DBra D5,Skuismee2
Skuismeeend Tst.B Lbf(A5)
Beq Nolbf
Tst.W Lbfmode(A5)
Bne Nolbf
Move.W #1,Lbfmode(A5)
Lea Lbf(A5),A1
Bsr SendTxt
Sub.L #1,D4
Tst D4
Beq Prompt
Nolbf Tst.W Exitmode(A5)
Bne Exit
Move.L Pospointer2(A5),A1
Bra Skuismee
Prompt Move.L A1,Pospointer1(A5)
Tst.L D5
Beq Skiptro2
Sub.L #1,D5
Skiptro2 Lea Moreprompttxt(PC),A1
Bsr SendTxt
Getkey Move.L Message(A5),A0 ;Wait for hotkey
Move.B #NT_MESSAGE,LN_TYPE(A0)
Add.L #MN_SIZE,A0
Move.W #11,(A0)
Move.L #0,2(A0)
Move.L #0,6(A0)
Move.L #0,10(A0)
Bsr SendMsg
Move.L Message(A5),A0
Add.L #MN_SIZE,A0
Moveq #0,D0
Move.B (A0),D0
Tst.B D0
Beq Exit
Cmp.B #'a',D0
Bcs UC_Belowtro
Cmp.B #'z',D0
Bhi UC_Belowtro
Sub.B #32,D0
UC_Belowtro Cmp.B #224,D0
Bcs UC_Nospecialtro
Sub.B #32,D0
UC_Nospecialtro
Cmp.B #'Q',D0
Beq Exit
Cmp.B #'?',D0
Beq ShowHelp
Cmp.B #13,D0
Beq Adv1line
Cmp.B #' ',D0
Beq Advpage
Cmp.B #'1',D0
Beq Adv1line
Cmp.B #'2',D0
Beq Adv2lines
Cmp.B #'3',D0
Beq Adv3lines
Cmp.B #'4',D0
Beq Adv4lines
Cmp.B #'5',D0
Beq Adv5lines
Cmp.B #'6',D0
Beq Adv6lines
Cmp.B #'7',D0
Beq Adv7lines
Cmp.B #'8',D0
Beq Adv8lines
Cmp.B #'9',D0
Beq Adv9lines
Cmp.B #'I',D0
Beq Clrscr
Cmp.B #'C',D0
Beq Continuous
Cmp.B #'F',D0
Beq FlagFile
Move.B D0,D2
Lea Externind(PC),A1
Bsr ExamineCfg
Tst.L D0
Beq Getkey
Addq.L #1,D0
Move.L D0,A0
Skilipiy Cmp.B #'~',(A0)
Beq Getkey
Move.B (A0),D0
Cmp.B D2,D0
Beq Matchf
Nextcfgline Cmp.B #10,(A0)+
Bne Nextcfgline
Bra Skilipiy
Matchf Add.l #2,A0
Lea Doorcommand(A5),A1
CPY_DCommand Cmp.B #10,(A0)
Beq CPY_DCommande
Move.B (A0)+,(A1)+
Bra CPY_DCommand
CPY_DCommande Move.B #0,(A1)+
Move.L Message(A5),A0
Move.B #NT_MESSAGE,LN_TYPE(A0)
Add.L #MN_SIZE,A0
Move.W #15,(A0)
Lea Doorcommand(A5),A1
Move.L A1,2(A0)
Bsr SendMsg
Bra Skiptro2
Exit Lea Skilipoo(PC),A1
Bsr SendTxt
Move.L 4.W,A6
Move.L Message(A5),A0
Move.B #NT_MESSAGE,LN_TYPE(A0)
Add.L #MN_SIZE,A0
Move.W #0,(A0)
Bsr SendMsg
CleanUp Tst.L DObject(A5)
Beq NoDObject
Move.L DosBase(A5),A6
Move.L #DOS_FIB,D1
Move.L DObject(A5),D2
Jsr _LVOFreeDosObject(A6)
NoDObject Move.L $4.W,A6
Tst.L DosBase(A5)
Beq Nodos
Move.L DosBase(A5),A1
Jsr _LVOCloseLibrary(A6)
Nodos Tst.L Message(A5)
Beq NoMessage
Move.L Message(A5),A1
Move.L #MN_SIZE+100,D0
Jsr _LVOFreeMem(A6)
NoMessage Tst.L Dirmem(A5)
Beq NoDir
Move.L Dirmem(A5),A1
Move.L Dirsize(A5),D0
Add.L #4,D0
Jsr _LVOFreeMem(A6)
NoDir Tst.L ConfigMem(A5)
Beq NoConf
Move.L ConfigMem(A5),A1
Move.L ConfigSize(A5),D0
Add.L #2,D0
Jsr _LVOFreeMem(A6)
NoConf Tst ReplyPort(A5)
Beq NoReplyPort
Move.L ReplyPort(A5),A0
Jsr _LVODeleteMsgPort(A6)
NoReplyPort Tst.l (A5)
Beq Nothing
Move.L A5,A1
Move.L #Memsize+4096,D0
Jsr _LVOFreeMem(A6)
Nothing Moveq #0,D0
Rts
Showline Movem.L D0-D1/A0-A2,-(SP)
Move.L Buffer(A5),A2
Move.W #0,Lbfmode(A5)
Cmp.B #' ',(A1)
Beq SL_Ansi5b
Move.L A1,A3
Lea 26(A1),A1
Lea DateStr(A5),A0
Move.B (A1)+,(A0)+
Move.B (A1)+,(A0)+
Move.B #'-',(A0)+
Add.L #1,A1
Move.B (A1)+,(A0)+
Move.B (A1)+,(A0)+
Move.B #'-',(A0)+
Add.L #1,A1
Move.B (A1)+,(A0)+
Move.B (A1)+,(A0)+
Move.B #0,(A0)
Move.B #FORMAT_CDN,DSFormat(A5)
Move.B #0,DSFlags(A5)
Lea DateStr(A5),A0
Move.L A0,DatePtr(A5)
Move.L #0,TimePtr(A5)
Move.L DosBase(A5),A6
Lea Ds1(A5),A0
Move.L A0,D1
Jsr _LVOStrToDate(A6)
Move.L Date(A5),D0
Move.l Ds1(A5),D1
Cmp.L D0,D1
Blo SL_NoNew
Move.L A3,A1
Lea 34(A1),A1
Move.B #'*',(A1)
SL_NoNew Move.L A3,A1
Lea Namea(A5),A0
SL_Ansi1 Move.B (A0)+,(A2)+
Bne SL_Ansi1
Sub.L #1,A2
Moveq #12,D0
SL_Cpy1 Move.B (A1)+,(A2)+
Dbra D0,SL_Cpy1
Lea Flagsa(A5),A0
SL_Ansi2 Move.B (A0)+,(A2)+
Bne SL_Ansi2
Sub.L #1,A2
Moveq #4,D0
SL_Cpy2 Move.B (A1)+,(A2)+
Dbra D0,SL_Cpy2
Lea Sizea(A5),A0
SL_Ansi3 Move.B (A0)+,(A2)+
Bne SL_Ansi3
Sub.L #1,A2
Moveq #7,D0
SL_Cpy3 Move.B (A1)+,(A2)+
Dbra D0,SL_Cpy3
Lea Datea(A5),A0
SL_Ansi4 Move.B (A0)+,(A2)+
Bne SL_Ansi4
Sub.L #1,A2
Moveq #8,D0
SL_Cpy4 Move.B (A1)+,(A2)+
Dbra D0,SL_Cpy4
SL_Ansi5b Lea Desca(A5),A0
SL_Ansi5 Move.B (A0)+,(A2)+
Bne SL_Ansi5
Sub.L #1,A2
SL_Cpy5 Move.B (A1)+,(A2)+
Bne SL_Cpy5
Move.L Buffer(A5),A1
Bsr SendTxt
Move.L Buffer(A5),A1
Move.B #10,(A1)
Move.B #0,1(A1)
Bsr SendTxt
Movem.L (SP)+,D0-D1/A0-A2
Rts
ShowHelp Move.L Message(A5),A0
Move.B #NT_MESSAGE,LN_TYPE(A0)
Add.L #MN_SIZE,A0
Move.W #4,(A0)
Lea Helpfilename(PC),A1
Move.L A1,2(A0)
Move.L #0,6(A0)
Moveq #0,D0
Bset #0,D0
Bset #1,D0
Move.L D0,10(A0)
Bsr SendMsg
Bra Prompt
Advpage Moveq #37,D0
Bsr Clearprompt
Move.L Pospointer1(A5),A1
Move.L Screenlength(A5),D4
Subq.L #1,D4
Bra Skuismee2
Adv1line Moveq #37,D0
Bsr Clearprompt
Move.L Pospointer1(A5),A1
Moveq #1,D4
Bra Skuismee2
Adv2lines Moveq #37,D0
Bsr Clearprompt
Move.L Pospointer1(A5),A1
Moveq #2,D4
Bra Skuismee2
Adv3lines Moveq #37,D0
Bsr Clearprompt
Move.L Pospointer1(A5),A1
Moveq #3,D4
Bra Skuismee2
Adv4lines Moveq #37,D0
Bsr Clearprompt
Move.L Pospointer1(A5),A1
Moveq #4,D4
Bra Skuismee2
Adv5lines Moveq #37,D0
Bsr Clearprompt
Move.L Pospointer1(A5),A1
Moveq #5,D4
Bra Skuismee2
Adv6lines Moveq #37,D0
Bsr Clearprompt
Move.L Pospointer1(A5),A1
Moveq #6,D4
Bra Skuismee2
Adv7lines Moveq #37,D0
Bsr Clearprompt
Move.L Pospointer1(A5),A1
Moveq #7,D4
Bra Skuismee2
Adv8lines Moveq #37,D0
Bsr Clearprompt
Move.L Pospointer1(A5),A1
Moveq #8,D4
Bra Skuismee2
Adv9lines Moveq #37,D0
Bsr Clearprompt
Move.L Pospointer1(A5),A1
Moveq #9,D4
Bra Skuismee2
Clrscr Moveq #37,D0
Bsr Clearprompt
Move.L Buffer(A5),A0
Move.B #12,(A0)
Move.B #0,1(A0)
Move.L Buffer(A5),A1
Bsr SendTxt
Move.L Pospointer1(A5),A1
Move.L Screenlength(A5),D4
Subq.L #1,D4
Bra Skuismee2
Continuous Moveq #37,D0
Bsr Clearprompt
Move.L Pospointer1(A5),A1
Moveq #-1,D4
Bra Skuismee2
Clearprompt Move.L Buffer(A5),A0
Move.B #13,(A0)+
CLP Move.B #' ',(A0)+
Dbra D0,CLP
Move.B #13,(A0)+
Move.B #0,(A0)
Move.L Buffer(A5),A1
Bsr SendTxt
Rts
ExitOn Move.W #1,Exitmode(A5)
Bra Slekepoo
FlagFile Moveq #37,D0
Bsr Clearprompt
Lea Fileflagtxt(PC),A1
Bsr SendTxt
Move.L Buffer(A5),A0
Move.B #0,512(A0)
Move.L Message(A5),A0
Move.B #NT_MESSAGE,LN_TYPE(A0)
Add.L #MN_SIZE,A0
Move.W #2,(A0)
Move.L Buffer(A5),2(A0)
Add.L #512,2(A0)
Move.W #70,6(A0)
Move.W #%110,8(A0)
Bsr SendMsg
Move.L Message(A5),A0
Tst.W MN_SIZE(A0)
Beq Exit
Move.L Buffer(A5),A0
Add.L #512,A0
Tst.B (A0)
Bne Sodomit
FFQuit Moveq #37,D0
Bsr Clearprompt
Bra Skiptro2
Sodomit Moveq #80,D0
Move.l A0,-(SP)
Bsr Clearprompt
Move.l (SP)+,A0
NoSkiptro2 Lea Flagstring(A5),A1
Tst.B (A0)
Beq FFQuit
CPY_FString Cmp.B #' ',(A0)
Beq .sodom
Move.B (A0)+,(A1)+
Bne CPY_FString
Move.L #0,A4
Bra .go
.sodom Move.B #0,(A1)
Lea 1(A0),A4
.go Move.L CConfDat(A5),A0
Moveq #0,D0
Move.B (A0),D0
Lea FFilename(A5),A0
Move.B #0,(A0)
Move.L Message(A5),A0
Move.B #NT_MESSAGE,LN_TYPE(A0)
Add.L #MN_SIZE,A0
Move.W #12,(A0)
Move.L D0,2(A0)
Lea Flagstring(A5),A1
Move.L A1,6(A0)
Move.L #0,10(A0)
Move.L A5,14(A0)
Bsr SendMsg
Cmp.L #0,A4
Beq Skiptro2
Tst.B (A4)
Beq Skiptro2
Move.L A4,A0
Bra NoSkiptro2
SendMsg Move.L $4.W,A6
Move.L Message(A5),A1
Move.L DoorPort(a5),A0
Jsr _LVOPutMsg(A6)
Move.L ReplyPort(A5),A0
Jsr _LVOWaitPort(A6)
Move.L ReplyPort(A5),A0
Jsr _LVOGetMsg(A6)
Rts
DpyMsg Movem.L D0-D7/A0-A3,-(SP)
Move.L SP,A1
Lea PutChar(PC),A2
Move.L Buffer(A5),A3
Move.L $4.W,A6
Jsr _LVORawDoFmt(A6)
Move.L DosBase(A5),A6
Jsr _LVOOutput(A6)
Move.L D0,D1
Beq.S NofHandle
Move.L A3,D2
CountLength Tst.B (A3)+
Bne CountLength
Subq.W #1,A3
Move.L A3,D3
Sub.L D2,D3
Jsr _LVOWrite(A6)
NofHandle Movem.L (SP)+,D0-D7/A0-A3
Rts
PutChar Move.B D0,(A3)+
Rts
Resume Move.L Message(A5),A0
Move.B #NT_MESSAGE,LN_TYPE(A0)
Add.L #MN_SIZE,A0
Move.W #11,(A0)
Move.L #0,2(A0)
Move.L #0,6(A0)
Move.L #0,10(A0)
Bsr SendMsg
Rts
Convnumb Moveq #0,D0
Moveq #0,D1
CA_Zok Move.B (A0)+,D1
Sub.B #'0',D1
Mulu.W #10,D0
Add.L D1,D0
Tst.B (A0)
Bne CA_Zok
Rts
SendTxt Move.L Message(A5),A0
Move.B #NT_MESSAGE,LN_TYPE(A0)
Add.L #MN_SIZE,A0
Move.W #1,(A0)
Move.L A1,2(A0)
Bsr SendMsg
Rts
FmtStr Movem.L D0-D7/A0-A3,-(SP)
Move.L SP,A1
Lea PutChar(PC),A2
Move.L Buffer(A5),A3
Move.L $4.W,A6
Jsr _LVORawDoFmt(A6)
Movem.L (SP)+,D0-D7/A0-A3
Rts
ExamineCfg Movem.L A0-A4,-(SP)
Move.L ConfigMem(A5),A0
Move.L A1,A4
EC_Notyet Move.L A4,A1
Tst.B (A0)
Beq EC_Notfnd
Cmp.B #';',(A0)
Beq EC_Halfdot
Cmpm.B (A0)+,(A1)+
Bne EC_Notyet
EC_Contsearch Tst.B (A1)
Beq EC_Fnd
Cmpm.B (A0)+,(A1)+
Beq EC_Contsearch
Bra EC_Notyet
EC_Notfnd Movem.L (SP)+,A0-A4
Moveq #0,D0
Rts
EC_Fnd Move.L A0,D0
Movem.L (SP)+,A0-A4
Rts
EC_Halfdot Cmp.B #10,(A0)+
Beq EC_Notyet
Tst.B (A0)
Beq EC_Notfnd
Bra EC_Halfdot
Nameind dc.b 'COLORNAME "',0
Flagsind dc.b 'COLORFLAGS "',0
Sizeind dc.b 'COLORSIZE "',0
Dateind dc.b 'COLORDATE "',0
Descind dc.b 'COLORDESC "',0
Lbfind dc.b 'LINEBETWEENFILES "',0
Externind dc.b 'EXTERNALS',0
DirectoryName dc.b '%sData/Directory.%03.ld',0
Portname dc.b 'DD_DoorPort',0
DosName dc.b 'dos.library',0
EnvName dc.b 'ENV:DREAMUTILS',0
VerName dc.b 'DayDream:Data/Version.DAT',0
Noporttxt dc.b '*ERROR* Not launched from DayDream! (%s not found)',10,0
ConfigName dc.b 'DreamNew.Cfg',0
Helpfilename dc.b 'DreamNewHelp',0
Fileflagtxt dc.b '
Enter Filename to Flag :
',0
Banner dc.b 10,'
DreamNew V1.0 By Hydra.
Loading Filelist...',10,10,0
Moreprompttxt dc.b '
DreamNew V1.0 By Hydra.
[
?
]
For help :',0
Nofilefoundtxt dc.b '
No match!
<
Resume
>',0
Dupetxt dc.b '
File "
%s
" Already Flagged!
<
Resume
>',0
FRatiotxt dc.b '
Your UL:DL
FILE
ratio is too low for downloading "
%s
"!
<
Resume
>',0
BRatiotxt dc.b '
Your UL:DL
BYTE
ratio is too low for downloading "
%s
"!
<
Resume
>',0
Skilipoo dc.b 10,10,0
Skiyei dc.b '%s/%s (%ld)',0
Skunkki dc.b '%ld',0